import config from "@/config"
import http from "@/utils/request"

export default {
	express: {
		list: {
			url: `${config.API_URL}order/index`,
			name: "快递列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		closeReason: {
			url: `${config.API_URL}order/closeReason`,
			name: "取消理由",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		price: {
			url: `${config.API_URL}company/cityPrice`,
			name: "价格计算",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		cancel: {
			url: `${config.API_URL}order/cancel`,
			name: "取消",
			post: async function(data){
				return await http.post(this.url, data, {
				});
			}
		},
		nofity: {
			url: `${config.API_URL}order/nofity`,
			name: "提醒",
			post: async function(data){
				return await http.post(this.url, data, {
				});
			}
		},
		update: {
			url: `${config.API_URL}order/update`,
			name: "更新",
			post: async function(data){
				return await http.get(this.url, data, {
				});
			}
		},
		prepay: {
			url: `${config.API_URL}order/prepay`,
			name: "付款",
			get: async function(params){
				return await http.post(this.url, params);
			}
		},
		unionpayCheck: {
			url: `${config.API_URL}unionpay/check`,
			name: "查询付款状态",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}order/delete`,
			name: "删除",
			post: async function(data){
				return await http.post(this.url, data, {
				});
			}
		},
	},
	distribution: {
		list: {
			url: `${config.API_URL}child/order`,
			name: "分销列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
	},
	MemberCard: {
		list: {
			url: `${config.API_URL}MemberCard/orderList`,
			name: "会员卡订单列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
	},
}
